# -*-coding:utf-8-*-
"""
@project: python-project
@Time: 2024-07-27 16:22
@Author: Loneliness_Burial
@File: numpy在某个维度做元素复制.py
@Motto: 深情不改必坠死海
@software: pycharm
@version: python 3.7
"""

import numpy as np

arr = np.random.randint(1, 10, (2, 3))
print(arr)
print("-------")

arr1 = arr.repeat(2, axis=0)
print("从0轴的位置复制2次 \n", arr1)
arr2 = arr.repeat(2, axis=1)
print("从1轴的位置复制2次 \n", arr2)
